#ifndef BaseCamera_h__
#define BaseCamera_h__

#include "Common/CommonTypes.h"

class CBaseCamera
{
public:
	CBaseCamera();
	virtual ~CBaseCamera();

	CMatrix GetWorldMatrix() { return m_mWorldMatrix; }
	CMatrix GetViewMatrix()  { return m_mViewMatrix;  }
	CMatrix GetProjMatrix()  { return m_mProjMatrix;  }

	CVector3 GetPosition()                            { return m_vPosition;      }
	void     SetPosition(const CVector3& vPosition)   { m_vPosition = vPosition; }    

	CVector3 GetLookAt()                              { return m_vLook;          }
	void     SetLookAt(const CVector3& vLookAt)       { m_vLook = vLookAt;   }    

	float   GetFov()                 { return m_fFov; }
	void    SetFov(float fFov)       { m_fFov = fFov; }
		
	float   GetFar()                 { return m_fFar; }
	void    SetFar(float fFar)       { m_fFar = fFar; }

	float   GetNear()                { return m_fNear; }
	void    SetNear(float fNear)     { m_fNear = fNear; }

	float   GetAspect()              { return m_fAspect; }
	void    SetAspect(float fAspect) { m_fAspect = fAspect; }
	
	virtual void Update(float fTime);
	virtual void Render();

private:
	void _ComputeViewMatrix();
	void _ComputeProjMatrix();

private:
	CMatrix  m_mWorldMatrix;
	CMatrix  m_mViewMatrix;
	CMatrix  m_mProjMatrix;

	CVector3 m_vPosition;
	CVector3 m_vRight;
	CVector3 m_vLook;
	CVector3 m_vUp;
	
	float    m_fFov;	
	float    m_fFar;
	float    m_fNear;
	float    m_fAspect;
};
#endif // BaseCamera_h__
